
package com.bolt.admin.module.test.repository;

import com.bolt.admin.module.test.entity.FruitOrderEntity;
import com.bolt.support.spring.jpa.repository.BasicJpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
* Auto Generate Javadoc
* @author
* 日期:2021-06-01 15:18:29
* 查询汇总演示-水果订单表 Repository
* */
@Repository
public interface FruitOrderRepository extends BasicJpaRepository<FruitOrderEntity,Integer> {

    @Query(nativeQuery = true,
            value = "select t.fruit_name,t.order_month,t.sale_count,t.sale_price,t.total_amt\n" +
                    "        from sqltoy_fruit_order t\n" +
                    "        order by t.order_month desc,t.fruit_name")
    List<Map<String,Object>> findByQid();
}